.class public Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;
.super Landroid/app/Activity;
.source "ZMDownloadListActivity.java"

# interfaces
.implements Landroid/content/DialogInterface$OnCancelListener;
.implements Landroid/widget/AdapterView$OnItemClickListener;
.implements Landroid/widget/ExpandableListView$OnChildClickListener;
.implements Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadItem$DownloadSelectListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;,
        Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;
    }
.end annotation


# static fields
.field private static final LOG_TAG:Ljava/lang/String; = "DownloadList"


# instance fields
.field private isExpanded:Z

.field private mContentObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;

.field private mDataSetObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;

.field private mDateOrderedListView:Landroid/widget/ExpandableListView;

.field private mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

.field private mDateSortedCursor:Landroid/database/Cursor;

.field private mEmptyView:Landroid/view/View;

.field private mExpandedMap:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/Integer;",
            "Ljava/lang/Boolean;",
            ">;"
        }
    .end annotation
.end field

.field private mHandler:Landroid/os/Handler;

.field private mIdColumnId:I

.field private mIsSortedBySize:Z

.field private mLocalUriColumnId:I

.field private mMediaTypeColumnId:I

.field private mQueuedDialog:Lcom/zuimeia/sdk/download/view/CustomAlertDialog;

.field private mQueuedDownloadId:Ljava/lang/Long;

.field private mReasonColumndId:I

.field private mSelectedIds:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation
.end field

.field private mSelectionDeleteButton:Landroid/widget/Button;

.field private mSelectionMenuView:Landroid/view/ViewGroup;

.field private mSizeOrderedListView:Landroid/widget/ListView;

.field private mSizeSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadAdapter;

.field private mSizeSortedCursor:Landroid/database/Cursor;

.field private mStatusColumnId:I

.field private mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;


# direct methods
.method public constructor <init>()V
    .registers 4

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 70
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 85
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;

    invoke-direct {v0, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V

    iput-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mContentObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;

    .line 86
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;

    invoke-direct {v0, p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$1;)V

    iput-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDataSetObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;

    .line 94
    iput-boolean v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIsSortedBySize:Z

    .line 95
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    .line 96
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mExpandedMap:Ljava/util/Map;

    .line 103
    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDownloadId:Ljava/lang/Long;

    .line 162
    iput-boolean v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isExpanded:Z

    .line 726
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mHandler:Landroid/os/Handler;

    return-void
.end method

.method static synthetic access$100(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->chooseListToShow()V

    return-void
.end method

.method static synthetic access$1000(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)Ljava/util/Map;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mExpandedMap:Ljava/util/Map;

    return-object v0
.end method

.method static synthetic access$200(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->ensureSomeGroupIsExpanded()V

    return-void
.end method

.method static synthetic access$300(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    return-object v0
.end method

.method static synthetic access$400(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)Landroid/widget/ExpandableListView;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    return-object v0
.end method

.method static synthetic access$500(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)Z
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    iget-boolean v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isExpanded:Z

    return v0
.end method

.method static synthetic access$502(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;Z)Z
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;
    .param p1, "x1"    # Z

    .prologue
    .line 70
    iput-boolean p1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isExpanded:Z

    return p1
.end method

.method static synthetic access$600(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)Ljava/util/Set;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    return-object v0
.end method

.method static synthetic access$700(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;Ljava/util/Set;)V
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;
    .param p1, "x1"    # Ljava/util/Set;

    .prologue
    .line 70
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->deleteDownloads(Ljava/util/Set;)V

    return-void
.end method

.method static synthetic access$800(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->clearSelection()V

    return-void
.end method

.method static synthetic access$900(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    .prologue
    .line 70
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    return-object v0
.end method

.method private activeListView()Landroid/widget/ListView;
    .registers 2

    .prologue
    .line 330
    iget-boolean v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIsSortedBySize:Z

    if-eqz v0, :cond_7

    .line 331
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeOrderedListView:Landroid/widget/ListView;

    .line 333
    :goto_6
    return-object v0

    :cond_7
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    goto :goto_6
.end method

.method private checkSelectionForDeletedEntries()V
    .registers 5

    .prologue
    .line 756
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    .line 757
    .local v0, "allIds":Ljava/util/Set;, "Ljava/util/Set<Ljava/lang/Long;>;"
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v2}, Landroid/database/Cursor;->moveToFirst()Z

    :goto_a
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v2}, Landroid/database/Cursor;->isAfterLast()Z

    move-result v2

    if-nez v2, :cond_27

    .line 758
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget v3, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIdColumnId:I

    invoke-interface {v2, v3}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 757
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v2}, Landroid/database/Cursor;->moveToNext()Z

    goto :goto_a

    .line 762
    :cond_27
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/Long;>;"
    :cond_2d
    :goto_2d
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_41

    .line 763
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_2d

    .line 764
    invoke-interface {v1}, Ljava/util/Iterator;->remove()V

    goto :goto_2d

    .line 767
    :cond_41
    return-void
.end method

.method private chooseListToShow()V
    .registers 4

    .prologue
    const/4 v2, 0x0

    const/16 v1, 0x8

    .line 314
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setVisibility(I)V

    .line 315
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeOrderedListView:Landroid/widget/ListView;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setVisibility(I)V

    .line 317
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    if-eqz v0, :cond_19

    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-nez v0, :cond_1f

    .line 318
    :cond_19
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mEmptyView:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 324
    :goto_1e
    return-void

    .line 320
    :cond_1f
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mEmptyView:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 321
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->activeListView()Landroid/widget/ListView;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/widget/ListView;->setVisibility(I)V

    .line 322
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->activeListView()Landroid/widget/ListView;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/ListView;->invalidateViews()V

    goto :goto_1e
.end method

.method private clearSelection()V
    .registers 2

    .prologue
    .line 650
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->clear()V

    .line 651
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->refresh()V

    .line 653
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showOrHideSelectionMenu()V

    .line 654
    return-void
.end method

.method private deleteDownloads(Ljava/util/Set;)V
    .registers 16
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Set",
            "<",
            "Ljava/lang/Long;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 660
    .local p1, "downloadIds":Ljava/util/Set;, "Ljava/util/Set<Ljava/lang/Long;>;"
    if-eqz p1, :cond_8

    invoke-interface {p1}, Ljava/util/Set;->size()I

    move-result v8

    if-nez v8, :cond_9

    .line 724
    :cond_8
    :goto_8
    return-void

    .line 664
    :cond_9
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mExpandedMap:Ljava/util/Map;

    if-nez v8, :cond_14

    .line 665
    new-instance v8, Ljava/util/HashMap;

    invoke-direct {v8}, Ljava/util/HashMap;-><init>()V

    iput-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mExpandedMap:Ljava/util/Map;

    .line 667
    :cond_14
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mExpandedMap:Ljava/util/Map;

    invoke-interface {v8}, Ljava/util/Map;->clear()V

    .line 668
    const/4 v2, 0x0

    .local v2, "groupPosition":I
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    invoke-virtual {v8}, Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;->getGroupCount()I

    move-result v6

    .local v6, "size":I
    :goto_20
    if-ge v2, v6, :cond_38

    .line 669
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mExpandedMap:Ljava/util/Map;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v9

    iget-object v10, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    invoke-virtual {v10, v2}, Landroid/widget/ExpandableListView;->isGroupExpanded(I)Z

    move-result v10

    invoke-static {v10}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v10

    invoke-interface {v8, v9, v10}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 668
    add-int/lit8 v2, v2, 0x1

    goto :goto_20

    .line 671
    :cond_38
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    invoke-virtual {v8}, Landroid/widget/ExpandableListView;->getFirstVisiblePosition()I

    move-result v1

    .line 673
    .local v1, "firstVisiablePosition":I
    invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v8

    :cond_42
    :goto_42
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v9

    if-eqz v9, :cond_b4

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    .line 674
    .local v0, "downloadId":Ljava/lang/Long;
    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v10

    invoke-direct {p0, v10, v11}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->moveToDownload(J)Z

    move-result v9

    if-eqz v9, :cond_42

    .line 675
    iget-object v9, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget v10, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mStatusColumnId:I

    invoke-interface {v9, v10}, Landroid/database/Cursor;->getInt(I)I

    move-result v7

    .line 676
    .local v7, "status":I
    const/16 v9, 0x8

    if-eq v7, v9, :cond_68

    const/16 v9, 0x10

    if-ne v7, v9, :cond_b2

    :cond_68
    const/4 v3, 0x1

    .line 677
    .local v3, "isComplete":Z
    :goto_69
    iget-object v9, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget v10, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mLocalUriColumnId:I

    invoke-interface {v9, v10}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 678
    .local v4, "localUri":Ljava/lang/String;
    if-eqz v3, :cond_9a

    if-eqz v4, :cond_9a

    .line 679
    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v9

    invoke-virtual {v9}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v5

    .line 680
    .local v5, "path":Ljava/lang/String;
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v9

    invoke-virtual {v9}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v5, v9}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_9a

    .line 681
    iget-object v9, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    const/4 v10, 0x1

    new-array v10, v10, [J

    const/4 v11, 0x0

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v12

    aput-wide v12, v10, v11

    invoke-virtual {v9, v10}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->markRowDeleted([J)I

    .line 684
    .end local v5    # "path":Ljava/lang/String;
    :cond_9a
    iget-object v9, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    const/4 v10, 0x1

    new-array v10, v10, [J

    const/4 v11, 0x0

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v12

    aput-wide v12, v10, v11

    invoke-virtual {v9, v10}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->remove([J)I

    .line 685
    new-instance v9, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$10;

    invoke-direct {v9, p0, v4}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$10;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;Ljava/lang/String;)V

    .line 697
    invoke-virtual {v9}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$10;->start()V

    goto :goto_42

    .line 676
    .end local v3    # "isComplete":Z
    .end local v4    # "localUri":Ljava/lang/String;
    :cond_b2
    const/4 v3, 0x0

    goto :goto_69

    .line 702
    .end local v0    # "downloadId":Ljava/lang/Long;
    .end local v7    # "status":I
    :cond_b4
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    iget-object v9, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    invoke-virtual {v8, v9}, Landroid/widget/ExpandableListView;->setAdapter(Landroid/widget/ExpandableListAdapter;)V

    .line 703
    iget-object v8, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mHandler:Landroid/os/Handler;

    new-instance v9, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$11;

    invoke-direct {v9, p0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$11;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;I)V

    const-wide/16 v10, 0x64

    invoke-virtual {v8, v9, v10, v11}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    goto/16 :goto_8
.end method

.method private ensureSomeGroupIsExpanded()V
    .registers 3

    .prologue
    .line 168
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    new-instance v1, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$1;

    invoke-direct {v1, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$1;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->post(Ljava/lang/Runnable;)Z

    .line 184
    return-void
.end method

.method private getCancelClickHandler()Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;
    .registers 2

    .prologue
    .line 341
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$5;

    invoke-direct {v0, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$5;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V

    return-object v0
.end method

.method private getDeleteClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;
    .registers 4
    .param p1, "downloadId"    # J

    .prologue
    .line 353
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$6;

    invoke-direct {v0, p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$6;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;J)V

    return-object v0
.end method

.method private getErrorMessage(Landroid/database/Cursor;)Ljava/lang/String;
    .registers 3
    .param p1, "cursor"    # Landroid/database/Cursor;

    .prologue
    .line 483
    iget v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mReasonColumndId:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    packed-switch v0, :pswitch_data_42

    .line 508
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getUnknownErrorMessage()Ljava/lang/String;

    move-result-object v0

    :goto_d
    return-object v0

    .line 485
    :pswitch_e
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isOnExternalStorage(Landroid/database/Cursor;)Z

    move-result v0

    if-eqz v0, :cond_1b

    .line 486
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_file_already_exists:I

    invoke-virtual {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 491
    :cond_1b
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getUnknownErrorMessage()Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 495
    :pswitch_20
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isOnExternalStorage(Landroid/database/Cursor;)Z

    move-result v0

    if-eqz v0, :cond_2d

    .line 496
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_insufficient_space_on_external:I

    invoke-virtual {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 498
    :cond_2d
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_insufficient_space_on_cache:I

    invoke-virtual {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 502
    :pswitch_34
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_media_not_found:I

    invoke-virtual {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 505
    :pswitch_3b
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_cannot_resume:I

    invoke-virtual {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 483
    :pswitch_data_42
    .packed-switch 0x3ee
        :pswitch_20
        :pswitch_34
        :pswitch_3b
        :pswitch_e
    .end packed-switch
.end method

.method private getPauseClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;
    .registers 4
    .param p1, "downloadId"    # J

    .prologue
    .line 373
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$7;

    invoke-direct {v0, p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$7;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;J)V

    return-object v0
.end method

.method private getRestartClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;
    .registers 4
    .param p1, "downloadId"    # J

    .prologue
    .line 409
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$9;

    invoke-direct {v0, p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$9;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;J)V

    return-object v0
.end method

.method private getResumeClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;
    .registers 4
    .param p1, "downloadId"    # J

    .prologue
    .line 391
    new-instance v0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$8;

    invoke-direct {v0, p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$8;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;J)V

    return-object v0
.end method

.method private getSelectionAsArray()[J
    .registers 7

    .prologue
    .line 259
    iget-object v3, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v3}, Ljava/util/Set;->size()I

    move-result v3

    new-array v2, v3, [J

    .line 260
    .local v2, "selectedIds":[J
    iget-object v3, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 261
    .local v1, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/Long;>;"
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_f
    array-length v3, v2

    if-ge v0, v3, :cond_21

    .line 262
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v4

    aput-wide v4, v2, v0

    .line 261
    add-int/lit8 v0, v0, 0x1

    goto :goto_f

    .line 264
    :cond_21
    return-object v2
.end method

.method private getUnknownErrorMessage()Ljava/lang/String;
    .registers 2

    .prologue
    .line 527
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_failed_body:I

    invoke-virtual {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private handleItemClick(Landroid/database/Cursor;)V
    .registers 7
    .param p1, "cursor"    # Landroid/database/Cursor;

    .prologue
    .line 448
    iget v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIdColumnId:I

    invoke-interface {p1, v2}, Landroid/database/Cursor;->getInt(I)I

    move-result v2

    int-to-long v0, v2

    .line 449
    .local v0, "id":J
    iget v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mStatusColumnId:I

    invoke-interface {p1, v2}, Landroid/database/Cursor;->getInt(I)I

    move-result v2

    sparse-switch v2, :sswitch_data_7e

    .line 476
    :goto_10
    return-void

    .line 452
    :sswitch_11
    invoke-direct {p0, v0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showRunningDialog(J)V

    goto :goto_10

    .line 456
    :sswitch_15
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isPausedForWifi(Landroid/database/Cursor;)Z

    move-result v2

    if-eqz v2, :cond_6e

    .line 457
    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDownloadId:Ljava/lang/Long;

    .line 458
    new-instance v2, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    invoke-direct {v2, p0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    sget v4, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_title_queued_body:I

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setTitle(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v2

    .line 459
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    sget v4, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_queued_body:I

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setMessage(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v2

    .line 460
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    sget v4, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_keep_queued_download:I

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getCancelClickHandler()Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setNegativeButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v2

    .line 461
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    sget v4, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_delete_download:I

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getDeleteClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setPositiveButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v2

    .line 462
    invoke-virtual {v2, p0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v2

    invoke-virtual {v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->show()V

    goto :goto_10

    .line 464
    :cond_6e
    invoke-direct {p0, v0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showPausedDialog(J)V

    goto :goto_10

    .line 469
    :sswitch_72
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->openCurrentDownload(Landroid/database/Cursor;)V

    goto :goto_10

    .line 473
    :sswitch_76
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getErrorMessage(Landroid/database/Cursor;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v0, v1, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showFailedDialog(JLjava/lang/String;)V

    goto :goto_10

    .line 449
    :sswitch_data_7e
    .sparse-switch
        0x1 -> :sswitch_11
        0x2 -> :sswitch_11
        0x4 -> :sswitch_15
        0x8 -> :sswitch_72
        0x10 -> :sswitch_76
    .end sparse-switch
.end method

.method private haveCursors()Z
    .registers 2

    .prologue
    .line 229
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    if-eqz v0, :cond_a

    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    if-eqz v0, :cond_a

    const/4 v0, 0x1

    :goto_9
    return v0

    :cond_a
    const/4 v0, 0x0

    goto :goto_9
.end method

.method private isOnExternalStorage(Landroid/database/Cursor;)Z
    .registers 9
    .param p1, "cursor"    # Landroid/database/Cursor;

    .prologue
    const/4 v4, 0x0

    .line 513
    iget v5, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mLocalUriColumnId:I

    invoke-interface {p1, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 514
    .local v2, "localUriString":Ljava/lang/String;
    if-nez v2, :cond_a

    .line 523
    :cond_9
    :goto_9
    return v4

    .line 517
    :cond_a
    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    .line 518
    .local v1, "localUri":Landroid/net/Uri;
    invoke-virtual {v1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v5

    const-string v6, "file"

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_9

    .line 521
    invoke-virtual {v1}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v3

    .line 522
    .local v3, "path":Ljava/lang/String;
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v4

    invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v0

    .line 523
    .local v0, "externalRoot":Ljava/lang/String;
    invoke-virtual {v3, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    goto :goto_9
.end method

.method private isPausedForWifi(Landroid/database/Cursor;)Z
    .registers 4
    .param p1, "cursor"    # Landroid/database/Cursor;

    .prologue
    .line 747
    iget v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mReasonColumndId:I

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    const/4 v1, 0x3

    if-ne v0, v1, :cond_b

    const/4 v0, 0x1

    :goto_a
    return v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method private moveToDownload(J)Z
    .registers 6
    .param p1, "downloadId"    # J

    .prologue
    .line 775
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    :goto_5
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->isAfterLast()Z

    move-result v0

    if-nez v0, :cond_21

    .line 776
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIdColumnId:I

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v0

    cmp-long v0, v0, p1

    if-nez v0, :cond_1b

    .line 777
    const/4 v0, 0x1

    .line 780
    :goto_1a
    return v0

    .line 775
    :cond_1b
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->moveToNext()Z

    goto :goto_5

    .line 780
    :cond_21
    const/4 v0, 0x0

    goto :goto_1a
.end method

.method private openCurrentDownload(Landroid/database/Cursor;)V
    .registers 10
    .param p1, "cursor"    # Landroid/database/Cursor;

    .prologue
    .line 426
    iget v4, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mLocalUriColumnId:I

    invoke-interface {p1, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 428
    .local v3, "localUri":Landroid/net/Uri;
    :try_start_a
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v5, "r"

    invoke-virtual {v4, v3, v5}, Landroid/content/ContentResolver;->openFileDescriptor(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor;

    move-result-object v4

    invoke-virtual {v4}, Landroid/os/ParcelFileDescriptor;->close()V
    :try_end_17
    .catch Ljava/io/FileNotFoundException; {:try_start_a .. :try_end_17} :catch_31
    .catch Ljava/io/IOException; {:try_start_a .. :try_end_17} :catch_6c

    .line 437
    :goto_17
    new-instance v2, Landroid/content/Intent;

    const-string v4, "android.intent.action.VIEW"

    invoke-direct {v2, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 438
    .local v2, "intent":Landroid/content/Intent;
    iget v4, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mMediaTypeColumnId:I

    invoke-interface {p1, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    .line 439
    const v4, 0x10000001

    invoke-virtual {v2, v4}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 441
    :try_start_2d
    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_30
    .catch Landroid/content/ActivityNotFoundException; {:try_start_2d .. :try_end_30} :catch_60

    .line 445
    .end local v2    # "intent":Landroid/content/Intent;
    :goto_30
    return-void

    .line 429
    :catch_31
    move-exception v1

    .line 430
    .local v1, "exc":Ljava/io/FileNotFoundException;
    const-string v4, "DownloadList"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "Failed to open download "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget v6, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIdColumnId:I

    invoke-interface {p1, v6}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v6

    invoke-virtual {v5, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 431
    iget v4, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIdColumnId:I

    invoke-interface {p1, v4}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v4

    sget v6, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_file_missing_body:I

    invoke-virtual {p0, v6}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-direct {p0, v4, v5, v6}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showFailedDialog(JLjava/lang/String;)V

    goto :goto_30

    .line 442
    .end local v1    # "exc":Ljava/io/FileNotFoundException;
    .restart local v2    # "intent":Landroid/content/Intent;
    :catch_60
    move-exception v0

    .line 443
    .local v0, "ex":Landroid/content/ActivityNotFoundException;
    sget v4, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_download_no_application_title:I

    const/4 v5, 0x1

    invoke-static {p0, v4, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v4

    invoke-virtual {v4}, Landroid/widget/Toast;->show()V

    goto :goto_30

    .line 433
    .end local v0    # "ex":Landroid/content/ActivityNotFoundException;
    .end local v2    # "intent":Landroid/content/Intent;
    :catch_6c
    move-exception v4

    goto :goto_17
.end method

.method private refresh()V
    .registers 2

    .prologue
    .line 644
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->requery()Z

    .line 645
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->requery()Z

    .line 647
    return-void
.end method

.method private setupViews()V
    .registers 6

    .prologue
    .line 187
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$layout;->zuimeia_sdk_download_list:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->setContentView(I)V

    .line 188
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_title:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getText(I)Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->setTitle(Ljava/lang/CharSequence;)V

    .line 190
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->date_ordered_list:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ExpandableListView;

    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    .line 191
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    invoke-virtual {v2, p0}, Landroid/widget/ExpandableListView;->setOnChildClickListener(Landroid/widget/ExpandableListView$OnChildClickListener;)V

    .line 192
    new-instance v1, Landroid/widget/RelativeLayout;

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 193
    .local v1, "viewGroup":Landroid/view/ViewGroup;
    new-instance v0, Landroid/widget/AbsListView$LayoutParams;

    const/4 v2, -0x1

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    sget v4, Lcom/zuimeia_sdk_download/downloadprovider/R$dimen;->zuimeia_sdk_download_list_footer_height:I

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v3

    invoke-direct {v0, v2, v3}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    .line 195
    .local v0, "lp":Landroid/widget/AbsListView$LayoutParams;
    invoke-virtual {v1, v0}, Landroid/view/ViewGroup;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 196
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    invoke-virtual {v2, v1}, Landroid/widget/ExpandableListView;->addFooterView(Landroid/view/View;)V

    .line 197
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->size_ordered_list:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ListView;

    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeOrderedListView:Landroid/widget/ListView;

    .line 198
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeOrderedListView:Landroid/widget/ListView;

    invoke-virtual {v2, p0}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 199
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->empty:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mEmptyView:Landroid/view/View;

    .line 201
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->selection_menu:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/view/ViewGroup;

    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    .line 202
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->selection_delete:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/Button;

    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionDeleteButton:Landroid/widget/Button;

    .line 203
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionDeleteButton:Landroid/widget/Button;

    new-instance v3, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$2;

    invoke-direct {v3, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$2;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 212
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->deselect_all:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/Button;

    new-instance v3, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$3;

    invoke-direct {v3, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$3;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 219
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->back_text:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    new-instance v3, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$4;

    invoke-direct {v3, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$4;-><init>(Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;)V

    invoke-virtual {v2, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 226
    return-void
.end method

.method private showFailedDialog(JLjava/lang/String;)V
    .registers 7
    .param p1, "downloadId"    # J
    .param p3, "dialogBody"    # Ljava/lang/String;

    .prologue
    .line 546
    new-instance v0, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    invoke-direct {v0, p0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_title_not_available:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setTitle(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 547
    invoke-virtual {v0, p3}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setMessage(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 548
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_cancel_running_download:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getCancelClickHandler()Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setNegativeButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 549
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_retry_download:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getRestartClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setPositiveButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->show()V

    .line 551
    return-void
.end method

.method private showOrHideSelectionMenu()V
    .registers 6

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 594
    iget-object v4, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v4}, Ljava/util/Set;->isEmpty()Z

    move-result v4

    if-nez v4, :cond_2c

    move v1, v2

    .line 595
    .local v1, "shouldBeVisible":Z
    :goto_b
    iget-object v4, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    invoke-virtual {v4}, Landroid/view/ViewGroup;->getVisibility()I

    move-result v4

    if-nez v4, :cond_2e

    move v0, v2

    .line 596
    .local v0, "isVisible":Z
    :goto_14
    if-eqz v1, :cond_30

    .line 597
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->updateSelectionMenu()V

    .line 598
    if-nez v0, :cond_2b

    .line 600
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    invoke-virtual {v2, v3}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 601
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    sget v3, Lcom/zuimeia_sdk_download/downloadprovider/R$anim;->zuimeia_sdk_download_footer_appear:I

    invoke-static {p0, v3}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/view/ViewGroup;->startAnimation(Landroid/view/animation/Animation;)V

    .line 608
    :cond_2b
    :goto_2b
    return-void

    .end local v0    # "isVisible":Z
    .end local v1    # "shouldBeVisible":Z
    :cond_2c
    move v1, v3

    .line 594
    goto :goto_b

    .restart local v1    # "shouldBeVisible":Z
    :cond_2e
    move v0, v3

    .line 595
    goto :goto_14

    .line 603
    .restart local v0    # "isVisible":Z
    :cond_30
    if-nez v1, :cond_2b

    if-eqz v0, :cond_2b

    .line 605
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 606
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    sget v3, Lcom/zuimeia_sdk_download/downloadprovider/R$anim;->zuimeia_sdk_download_footer_disappear:I

    invoke-static {p0, v3}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/view/ViewGroup;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_2b
.end method

.method private showPausedDialog(J)V
    .registers 6
    .param p1, "downloadId"    # J

    .prologue
    .line 539
    new-instance v0, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    invoke-direct {v0, p0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_queued:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setTitle(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 540
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_paused_body:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setMessage(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 541
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_cancel_running_download:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getCancelClickHandler()Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setNegativeButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 542
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_resume_download:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResumeClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setPositiveButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->show()V

    .line 543
    return-void
.end method

.method private showRunningDialog(J)V
    .registers 6
    .param p1, "downloadId"    # J

    .prologue
    .line 531
    new-instance v0, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    invoke-direct {v0, p0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_running:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setTitle(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 532
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_dialog_running_body:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setMessage(Ljava/lang/String;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 533
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_cancel_running_download:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getCancelClickHandler()Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setNegativeButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    .line 534
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_pause_download:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getPauseClickHandler(J)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->setPositiveButton(Ljava/lang/String;Lcom/zuimeia/sdk/download/view/CustomAlertDialog$OnMyAlertClickListener;)Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog$AlertBuilder;->show()V

    .line 536
    return-void
.end method

.method private updateSelectionMenu()V
    .registers 11

    .prologue
    const/4 v5, 0x1

    .line 614
    sget v1, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_delete_download:I

    .line 615
    .local v1, "deleteButtonStringId":I
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v2}, Ljava/util/Set;->size()I

    move-result v2

    if-ne v2, v5, :cond_3e

    .line 616
    iget-object v3, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    new-instance v4, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;

    invoke-direct {v4}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;-><init>()V

    new-array v5, v5, [J

    const/4 v6, 0x0

    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Long;

    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v8

    aput-wide v8, v5, v6

    invoke-virtual {v4, v5}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;->setFilterById([J)Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;

    move-result-object v2

    invoke-virtual {v3, v2}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->query(Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;)Landroid/database/Cursor;

    move-result-object v0

    .line 618
    .local v0, "cursor":Landroid/database/Cursor;
    :try_start_2f
    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    .line 619
    iget v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mStatusColumnId:I

    invoke-interface {v0, v2}, Landroid/database/Cursor;->getInt(I)I
    :try_end_37
    .catchall {:try_start_2f .. :try_end_37} :catchall_4f

    move-result v2

    sparse-switch v2, :sswitch_data_54

    .line 634
    :goto_3b
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 637
    .end local v0    # "cursor":Landroid/database/Cursor;
    :cond_3e
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionDeleteButton:Landroid/widget/Button;

    sget v3, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_delete_download:I

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setText(I)V

    .line 638
    return-void

    .line 621
    .restart local v0    # "cursor":Landroid/database/Cursor;
    :sswitch_46
    :try_start_46
    sget v1, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_delete_download:I

    .line 622
    goto :goto_3b

    .line 625
    :sswitch_49
    sget v1, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_remove_download:I

    .line 626
    goto :goto_3b

    .line 630
    :sswitch_4c
    sget v1, Lcom/zuimeia_sdk_download/downloadprovider/R$string;->zuimeia_sdk_download_cancel_running_download:I
    :try_end_4e
    .catchall {:try_start_46 .. :try_end_4e} :catchall_4f

    goto :goto_3b

    .line 634
    :catchall_4f
    move-exception v2

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    throw v2

    .line 619
    :sswitch_data_54
    .sparse-switch
        0x1 -> :sswitch_49
        0x2 -> :sswitch_4c
        0x4 -> :sswitch_4c
        0x10 -> :sswitch_46
    .end sparse-switch
.end method


# virtual methods
.method handleDownloadsChanged()V
    .registers 3

    .prologue
    .line 737
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->checkSelectionForDeletedEntries()V

    .line 739
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDownloadId:Ljava/lang/Long;

    if-eqz v0, :cond_2b

    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDownloadId:Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v0

    invoke-direct {p0, v0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->moveToDownload(J)Z

    move-result v0

    if-eqz v0, :cond_2b

    .line 740
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mStatusColumnId:I

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_26

    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-direct {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->isPausedForWifi(Landroid/database/Cursor;)Z

    move-result v0

    if-nez v0, :cond_2b

    .line 741
    :cond_26
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDialog:Lcom/zuimeia/sdk/download/view/CustomAlertDialog;

    invoke-virtual {v0}, Lcom/zuimeia/sdk/download/view/CustomAlertDialog;->cancel()V

    .line 744
    :cond_2b
    return-void
.end method

.method public isDownloadSelected(J)Z
    .registers 6
    .param p1, "id"    # J

    .prologue
    .line 730
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public onCancel(Landroid/content/DialogInterface;)V
    .registers 5
    .param p1, "dialog"    # Landroid/content/DialogInterface;

    .prologue
    const/4 v2, 0x0

    .line 788
    const-string v0, ""

    const-string v1, "dialog cancel"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 789
    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDownloadId:Ljava/lang/Long;

    .line 790
    iput-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mQueuedDialog:Lcom/zuimeia/sdk/download/view/CustomAlertDialog;

    .line 791
    return-void
.end method

.method public onChildClick(Landroid/widget/ExpandableListView;Landroid/view/View;IIJ)Z
    .registers 8
    .param p1, "parent"    # Landroid/widget/ExpandableListView;
    .param p2, "v"    # Landroid/view/View;
    .param p3, "groupPosition"    # I
    .param p4, "childPosition"    # I
    .param p5, "id"    # J

    .prologue
    .line 556
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    invoke-virtual {v0, p3, p4}, Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;->moveCursorToChildPosition(II)Z

    .line 557
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-direct {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->handleItemClick(Landroid/database/Cursor;)V

    .line 558
    const/4 v0, 0x1

    return v0
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .registers 8
    .param p1, "icicle"    # Landroid/os/Bundle;

    .prologue
    const/4 v5, 0x1

    .line 129
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 130
    invoke-virtual {p0, v5}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->requestWindowFeature(I)Z

    .line 131
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->setupViews()V

    .line 132
    new-instance v1, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v1, v2, v3, v4}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;-><init>(Landroid/content/Context;Landroid/content/ContentResolver;Ljava/lang/String;)V

    iput-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    .line 133
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    invoke-virtual {v1, v5}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->setAccessAllDownloads(Z)V

    .line 134
    new-instance v1, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;

    invoke-direct {v1}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;-><init>()V

    invoke-virtual {v1, v5}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;->setOnlyIncludeVisibleInDownloadsUi(Z)Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;

    move-result-object v0

    .line 135
    .local v0, "baseQuery":Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    invoke-virtual {v1, v0}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->query(Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;)Landroid/database/Cursor;

    move-result-object v1

    iput-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    .line 136
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mZMDownloadManager:Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    const-string v2, "total_size"

    const/4 v3, 0x2

    invoke-virtual {v0, v2, v3}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;->orderBy(Ljava/lang/String;I)Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->query(Lcom/zuimeia/sdk/download/providers/ZMDownloadManager$Query;)Landroid/database/Cursor;

    move-result-object v1

    iput-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    .line 141
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->haveCursors()Z

    move-result v1

    if-eqz v1, :cond_a7

    .line 142
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-virtual {p0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->startManagingCursor(Landroid/database/Cursor;)V

    .line 143
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    invoke-virtual {p0, v1}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->startManagingCursor(Landroid/database/Cursor;)V

    .line 145
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    const-string v2, "status"

    invoke-interface {v1, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mStatusColumnId:I

    .line 146
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    const-string v2, "_id"

    invoke-interface {v1, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIdColumnId:I

    .line 147
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    const-string v2, "local_uri"

    invoke-interface {v1, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mLocalUriColumnId:I

    .line 148
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    const-string v2, "media_type"

    invoke-interface {v1, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mMediaTypeColumnId:I

    .line 149
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    const-string v2, "reason"

    invoke-interface {v1, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mReasonColumndId:I

    .line 151
    new-instance v1, Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    invoke-direct {v1, p0, v2, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;-><init>(Landroid/content/Context;Landroid/database/Cursor;Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadItem$DownloadSelectListener;)V

    iput-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    .line 152
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateOrderedListView:Landroid/widget/ExpandableListView;

    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DateSortedDownloadAdapter;

    invoke-virtual {v1, v2}, Landroid/widget/ExpandableListView;->setAdapter(Landroid/widget/ExpandableListAdapter;)V

    .line 153
    new-instance v1, Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadAdapter;

    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    invoke-direct {v1, p0, v2, p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadAdapter;-><init>(Landroid/content/Context;Landroid/database/Cursor;Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadItem$DownloadSelectListener;)V

    iput-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadAdapter;

    .line 154
    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeOrderedListView:Landroid/widget/ListView;

    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedAdapter:Lcom/zuimeia/sdk/download/providers/downloads/ui/DownloadAdapter;

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 156
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->ensureSomeGroupIsExpanded()V

    .line 159
    :cond_a7
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->chooseListToShow()V

    .line 160
    return-void
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .registers 4
    .param p1, "menu"    # Landroid/view/Menu;

    .prologue
    .line 281
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->haveCursors()Z

    move-result v1

    if-eqz v1, :cond_f

    .line 282
    invoke-virtual {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    .line 283
    .local v0, "inflater":Landroid/view/MenuInflater;
    sget v1, Lcom/zuimeia_sdk_download/downloadprovider/R$menu;->zuimeia_sdk_download_ui_menu:I

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    .line 285
    .end local v0    # "inflater":Landroid/view/MenuInflater;
    :cond_f
    const/4 v1, 0x1

    return v1
.end method

.method public onDownloadSelectionChanged(JZ)V
    .registers 7
    .param p1, "downloadId"    # J
    .param p3, "isSelected"    # Z

    .prologue
    .line 571
    if-eqz p3, :cond_f

    .line 572
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 576
    :goto_b
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showOrHideSelectionMenu()V

    .line 577
    return-void

    .line 574
    :cond_f
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z

    goto :goto_b
.end method

.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .registers 7
    .param p2, "view"    # Landroid/view/View;
    .param p3, "position"    # I
    .param p4, "id"    # J
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 564
    .local p1, "parent":Landroid/widget/AdapterView;, "Landroid/widget/AdapterView<*>;"
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    invoke-interface {v0, p3}, Landroid/database/Cursor;->moveToPosition(I)Z

    .line 565
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSizeSortedCursor:Landroid/database/Cursor;

    invoke-direct {p0, v0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->handleItemClick(Landroid/database/Cursor;)V

    .line 566
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .registers 7
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    const/4 v1, 0x0

    .line 581
    const/4 v2, 0x4

    if-ne p1, v2, :cond_2d

    .line 582
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    invoke-virtual {v2}, Landroid/view/ViewGroup;->getVisibility()I

    move-result v2

    if-nez v2, :cond_2b

    const/4 v0, 0x1

    .line 583
    .local v0, "isVisible":Z
    :goto_d
    if-eqz v0, :cond_2d

    .line 584
    sget v2, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->deselect_all:I

    invoke-virtual {p0, v2}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/View;->performClick()Z

    .line 585
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 586
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectionMenuView:Landroid/view/ViewGroup;

    sget v3, Lcom/zuimeia_sdk_download/downloadprovider/R$anim;->zuimeia_sdk_download_footer_disappear:I

    invoke-static {p0, v3}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/view/ViewGroup;->startAnimation(Landroid/view/animation/Animation;)V

    .line 590
    .end local v0    # "isVisible":Z
    :goto_2a
    return v1

    :cond_2b
    move v0, v1

    .line 582
    goto :goto_d

    .line 590
    :cond_2d
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v1

    goto :goto_2a
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .registers 6
    .param p1, "item"    # Landroid/view/MenuItem;

    .prologue
    const/4 v1, 0x0

    const/4 v0, 0x1

    .line 297
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v2

    sget v3, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->download_menu_sort_by_size:I

    if-ne v2, v3, :cond_10

    .line 298
    iput-boolean v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIsSortedBySize:Z

    .line 299
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->chooseListToShow()V

    .line 306
    :goto_f
    return v0

    .line 301
    :cond_10
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v2

    sget v3, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->download_menu_sort_by_date:I

    if-ne v2, v3, :cond_1e

    .line 302
    iput-boolean v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIsSortedBySize:Z

    .line 303
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->chooseListToShow()V

    goto :goto_f

    :cond_1e
    move v0, v1

    .line 306
    goto :goto_f
.end method

.method protected onPause()V
    .registers 3

    .prologue
    .line 244
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 245
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->haveCursors()Z

    move-result v0

    if-eqz v0, :cond_17

    .line 246
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mContentObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;

    invoke-interface {v0, v1}, Landroid/database/Cursor;->unregisterContentObserver(Landroid/database/ContentObserver;)V

    .line 247
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDataSetObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;

    invoke-interface {v0, v1}, Landroid/database/Cursor;->unregisterDataSetObserver(Landroid/database/DataSetObserver;)V

    .line 249
    :cond_17
    return-void
.end method

.method public onPrepareOptionsMenu(Landroid/view/Menu;)Z
    .registers 4
    .param p1, "menu"    # Landroid/view/Menu;

    .prologue
    const/4 v1, 0x0

    .line 290
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->download_menu_sort_by_size:I

    invoke-interface {p1, v0}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 291
    sget v0, Lcom/zuimeia_sdk_download/downloadprovider/R$id;->download_menu_sort_by_date:I

    invoke-interface {p1, v0}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 292
    invoke-super {p0, p1}, Landroid/app/Activity;->onPrepareOptionsMenu(Landroid/view/Menu;)Z

    move-result v0

    return v0
.end method

.method protected onRestoreInstanceState(Landroid/os/Bundle;)V
    .registers 9
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 269
    invoke-super {p0, p1}, Landroid/app/Activity;->onRestoreInstanceState(Landroid/os/Bundle;)V

    .line 270
    const-string v2, "isSortedBySize"

    invoke-virtual {p1, v2}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v2

    iput-boolean v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIsSortedBySize:Z

    .line 271
    iget-object v2, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-interface {v2}, Ljava/util/Set;->clear()V

    .line 272
    const-string v2, "selection"

    invoke-virtual {p1, v2}, Landroid/os/Bundle;->getLongArray(Ljava/lang/String;)[J

    move-result-object v3

    array-length v4, v3

    const/4 v2, 0x0

    :goto_18
    if-ge v2, v4, :cond_28

    aget-wide v0, v3, v2

    .line 273
    .local v0, "selectedId":J
    iget-object v5, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mSelectedIds:Ljava/util/Set;

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v6

    invoke-interface {v5, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 272
    add-int/lit8 v2, v2, 0x1

    goto :goto_18

    .line 275
    .end local v0    # "selectedId":J
    :cond_28
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->chooseListToShow()V

    .line 276
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->showOrHideSelectionMenu()V

    .line 277
    return-void
.end method

.method protected onResume()V
    .registers 3

    .prologue
    .line 234
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 235
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->haveCursors()Z

    move-result v0

    if-eqz v0, :cond_1a

    .line 236
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mContentObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyContentObserver;

    invoke-interface {v0, v1}, Landroid/database/Cursor;->registerContentObserver(Landroid/database/ContentObserver;)V

    .line 237
    iget-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDateSortedCursor:Landroid/database/Cursor;

    iget-object v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mDataSetObserver:Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity$MyDataSetObserver;

    invoke-interface {v0, v1}, Landroid/database/Cursor;->registerDataSetObserver(Landroid/database/DataSetObserver;)V

    .line 238
    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->refresh()V

    .line 240
    :cond_1a
    return-void
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .registers 4
    .param p1, "outState"    # Landroid/os/Bundle;

    .prologue
    .line 253
    invoke-super {p0, p1}, Landroid/app/Activity;->onSaveInstanceState(Landroid/os/Bundle;)V

    .line 254
    const-string v0, "isSortedBySize"

    iget-boolean v1, p0, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->mIsSortedBySize:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 255
    const-string v0, "selection"

    invoke-direct {p0}, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;->getSelectionAsArray()[J

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putLongArray(Ljava/lang/String;[J)V

    .line 256
    return-void
.end method
